package com.cac.demo.service.inBill;


import com.cac.demo.dao.inBill.inBillDao;
import com.cac.demo.util.adapter.QueryReqBean;
import com.cac.demo.util.adapter.QueryRespBean;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;

@Service
public class inBillService {
    @Autowired
    private inBillDao inBillDaos;
    public QueryRespBean<HashMap> inBillQuery(QueryReqBean<HashMap> queryReqBean, String orderBy, String Keywords) {
        QueryRespBean<HashMap> queryRespBean =new QueryRespBean<>();
        PageHelper.startPage(queryReqBean.getPageParameter());
        HashMap searchParams = queryReqBean.getSearchParams();
        Page<HashMap> dataList = inBillDaos.inBillQuery(searchParams,orderBy,Keywords);
        queryRespBean.setResult(dataList);
        return queryRespBean;
    }
}
